<?php

namespace plugin\agent\app\admin\controller;

use app\common\controller\BaseAdminController;
use plugin\agent\app\admin\logic\AgentRuleLogic;
use plugin\agent\app\admin\validate\AgentRuleValidate;

class AgentRuleController extends BaseAdminController
{
    protected function init()
    {
        parent::init();
        $this->logic = new AgentRuleLogic();
        $this->validate = new AgentRuleValidate();
    }

    public function getAllRules()
    {
        $where = [];
        $data = $this->logic->getList($where, [
            'id',
            'name',
            'one_rate',
            'two_rate',
            'three_rate',
        ]);
        return $this->success($data);
    }
}
